{include file="public/header"/}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="alert alert-danger ibox-content" style="text-align:center">
                    <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
                    <div>尊敬的管理员<span id="weather"></span></div>
                </div>
            </div>
        </div>
    </div>

    <!-- 上方tab -->
    <div class="row">
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <span class="label label-success pull-right">位</span>
                    <h5>管理员</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins" id="tip1">{$info['admin']}</h1>
                    <small>总管理员数</small>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <span class="label label-success pull-right">个</span>
                    <h5>角色</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins" id="tip2">{$info['role']}</h1>
                    <small>总角色数</small>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <span class="label label-success pull-right">个</span>
                    <h5>菜单</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins" id="tip3">{$info['menu']}</h1>
                    <small>总菜单数</small>
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <span class="label label-success pull-right">个</span>
                    <h5>配置</h5>
                </div>
                <div class="ibox-content">
                    <h1 class="no-margins" id="tip4">{$info['config']}</h1>
                    <small>总配置数</small>
                </div>
            </div>
        </div>
    </div>

    <!-- 中间折线 -->
    <div class="row">
        <div class="col-sm-12">
            <div class="col-sm-6">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <i class="fa fa-cogs"></i> 系统信息
                    </div>
                    <div class="panel-body">
                        <p><i class="fa fa-sitemap"></i> 框架版本：ThinkPHP{$info.think_v}
                        </p>
                        <p><i class="fa fa-windows"></i> 服务环境：{$info.web_server}
                        </p>
                        <p><i class="fa fa-warning"></i> 上传附件限制：{$info.onload}
                        </p>
                        <p><i class="fa fa-credit-card"></i> PHP 版本：{$info.phpversion}
                        </p>
                        <p><i class="fa fa-database"></i> MYSQL 版本：{$info['mysqlversion'][0]['version()']}
                        </p>
                        <p><i class="fa fa-internet-explorer"></i> 域名：{$info.host}
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{include file="public/footer" /}
<script src="__JS__/jquery.leoweather.min.js"></script>
<script type="text/javascript">
    $('#weather').leoweather({
        format:'，{时段}好！<span id="colock">现在时间是：<strong>{年}年{月}月{日}日 星期{周} {时}:{分}:{秒}</strong></span> '
    });
</script>
<script>
    //实时刷新数据
    $(function(){
        // setInterval("getAdminCount('tip1','admin','{:url(\"admin/Index/indexPage\")}')",5000);
        // setInterval("getRoleCount('tip2','role','{:url(\"admin/Index/indexPage\")}')",5000);
        // setInterval("getMenuCount('tip3','menu','{:url(\"admin/Index/indexPage\")}')",5000);
        // setInterval("getConfigCount('tip4','config','{:url(\"admin/Index/indexPage\")}')",5000);
    })
    //管理员
    function getAdminCount(obj,type,url){
        wk.refresh(obj,type,url);
    }
    //角色
    function getRoleCount(obj,type,url){
        wk.refresh(obj,type,url);
    }
    //菜单
    function getMenuCount(obj,type,url){
        wk.refresh(obj,type,url);
    }
    //配置
    function getConfigCount(obj,type,url){
        wk.refresh(obj,type,url);
    }
</script>
</body>
</html>